home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 23 / 64er_Magazin_Sonderheft_23_19xx_Markt__Technik_de_Disk_2_of_2_Side_A.d64 / spulen berechnen (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  8KB  |  246 lines

  1. 10 poke53280,1:poke53281,1:print"[147]"
  2. 20 poke646,0:poke53272,23:o1=0:o2=0
  3. 50 rem ** spule (hf-drossel) **
  4. 100 gosub50000:close2:open2,0:goto1000
  5. 500 rem ** get **
  6. 510 poke198,0:wait198,1:geta$:a=val(a$):return
  7. 1000 rem ** menue **
  8. 1010 print"[147]":syssz,0,0,t$(0):syssz,0,1,t$(1):syssz,0,2,t$(2):syssz,0,3,t$(3)
  9. 1020 syssz,0,4,t$(4)
  10. 1030 syssz,3,8,"1 = [211]pule berechnen"
  11. 1040 syssz,3,10,"2 = [203]erntabelle auflisten"
  12. 1050 syssz,3,12,"3 = [196]rahttabelle auflisten"
  13. 1060 syssz,3,14,"4 = [197]rgebnis ausdrucken"
  14. 1070 syssz,3,16,"5 = [212]abellen ausdrucken"
  15. 1080 syssz,3,19,t$(8)
  16. 1100 gosub500:ifa<1ora>5then1100
  17. 1110 onagosub2000,6000,7000,55000,56000
  18. 1120 goto1010
  19. 2000 rem ** eingabe **
  20. 2010 ifm4=2then2100
  21. 2020 t1=1:l1=0:d1=0:b1=0:k1=0:a1=0:f1=0:x1=0:y1=0:m2=0:m3=0:m4=0
  22. 2100 forj=5to23:syssz,0,j,t$(7):next:syssz,2,3,"[211]pulendaten           ":print
  23. 2110 syssz,1,6,"[204]  in [200]enry  = "l1:syssz,17,6,"";:input#2,a$:l1=val(a$)
  24. 2120 syssz,1,8,"[196]  [203]ern      = "d1:syssz,17,8,"";:input#2,a$:d1=val(a$)
  25. 2130 syssz,1,10,"[194]  [203]ern      = "b1:syssz,17,10,"";:input#2,a$:b1=val(a$)
  26. 2140 syssz,1,12,"[203]z 1-2       = "k1:syssz,17,12,"";:input#2,a$:k1=val(a$)
  27. 2150 ifk1<1ork1>2then2140
  28. 2160 syssz,1,14,"[193]l in n[200]enry = "a1:syssz,17,14,"";:input#2,a$:a1=val(a$)
  29. 2170 syssz,1,16,"f  in [200]erz   = "f1:syssz,17,16,"";:input#2,a$:f1=val(a$)
  30. 2180 gosub3000:return
  31. 3000 rem ** kerntabelle lesen **
  32. 3010 forj1=1to15
  33. 3020 ifq(j1,1)=d1andq(j1,2)=b1andq(j1,3)=k1thenx1=q(j1,4):y1=q(j1,5):goto3040
  34. 3030 next
  35. 3040 ifx1=0ory1=0orj1>15thensyssz,0,20,t$(10):syssz,0,21,t$(11)
  36. 3050 ifx1=0ory1=0orj1>15thensyssz,0,22,t$(12)" (j/n)":goto3070
  37. 3060 goto3090
  38. 3070 gosub500:ifa$="j"thenm4=2:gosub6000
  39. 3080 goto2100
  40. 3090 n1=sqr(l1/(1e-9*a1))
  41. 4000 rem ** ausgabe **
  42. 4010 m2=0:m4=0
  43. 4020 n5=n1:n=n5:gosub9000:ifm4=1thengoto2000
  44. 4030 e1=d3:e2=d4:na=n5:ma=m2:ra=r:ra$=r$:la=l:la$=l$:fa=fe:z3=0
  45. 4040 iff1<>0thenz3=2*(NULL)*f1*l1
  46. 4050 r=z3:gosub8200:r2=r:r2$=r$
  47. 4060 qq=z3/r9:qq=int(qq*10)/10
  48. 4070 forj=6to23:syssz,0,j,t$(7):next
  49. 4080 syssz,0,6,"[204]  in [200]enry   =";l1
  50. 4090 syssz,0,7,"[196]  [203]ern       =";d1
  51. 4100 syssz,0,8,"[194]  [203]ern       =";b1
  52. 4110 syssz,0,9,"[203]z 1-2        =";k1
  53. 4120 syssz,0,10,"[193]l in n[200]enry  =";a1
  54. 4130 syssz,0,11,"f  in [200]erz    =";f1
  55. 4140 syssz,0,13,"[206]             =";na
  56. 4150 ifma=0thenprinttab(24)"[145][215]indungen"
  57. 4160 ifma=1thenprinttab(24)"[145]*2 [215]ind.par."
  58. 4170 syssz,0,14,"[196]  [206]ennd.     =";e1;tab(24)"[195]ul"
  59. 4180 syssz,0,15,"[196]  [193]ussend.   =";e2;tab(24)"[195]ul"
  60. 4190 syssz,0,16,"[210][195]u           =";ra;tab(24)ra$
  61. 4200 syssz,0,17,"[216]l [201]nduktanz  =";r2;tab(24)r2$
  62. 4210 syssz,0,18,"[209]  [211]pulenguete=";qq
  63. 4220 syssz,0,19,"f[195]u           =";fa;tab(24)"[203]upferfuellfak."
  64. 4230 gosub5000:ifm4=1thenreturn
  65. 4240 gosub9080:goto4030
  66. 5000 rem ** drahtstaerke aendern **
  67. 5010 syssz,0,21,t$(13):m3=1
  68. 5020 syssz,0,23," [196]n+1=[198]1  [196]n-1=[198]3  [193]ndere [198]7 ":gosub500
  69. 5030 ifa$=chr$(13)thenm4=1:return
  70. 5040 ifa$=chr$(136)then2100
  71. 5050 ifa$=chr$(133)andj2=31andma=1thenreturn
  72. 5060 ifa$=chr$(133)thenj2=j2+1:ifj2>31thenj2=26:ma=1:goto5080
  73. 5070 goto5090
  74. 5080 d3=q1(j2,1):d4=q1(j2,2):z1=q1(j2,3):return
  75. 5090 ifa$=chr$(134)thenj2=j2-1:ifj2<26andm2=1thenj2=31:ma=0
  76. 5100 d3=q1(j2,1):d4=q1(j2,2):z1=q1(j2,3):return
  77. 6000 rem ** kerntabelle lesen **
  78. 6010 forj=5to23:syssz,0,j,t$(7):next
  79. 6020 syssz,2,3,"[203]erntabelle auflisten"
  80. 6030 syssz,1,5," [196]  [203]ern  [194] "," [203]z "," l/[206] "
  81. 6040 forj=1to15
  82. 6050 syssz,1,j+6,q(j,1),q(j,2),q(j,3),q(j,6)
  83. 6060 next:goto500
  84. 7000 rem ** drahttabelle lesen **
  85. 7010 forj=5to23:syssz,0,j,t$(7):next
  86. 7020 syssz,2,3,"[196]rahttabelle auflisten"
  87. 7030 syssz,2,5," [196]n "," [196]a "," [210]=[207]hm/m "
  88. 7040 forj=1to15
  89. 7050 syssz,1,j+6,q1(j,1),q1(j,2),q1(j,3):next
  90. 7060 print" weiter mit return":gosub500
  91. 7070 forj=6to23:syssz,0,j,t$(7):next
  92. 7080 forj=16to31
  93. 7090 syssz,1,j-9,q1(j,1),q1(j,2),q1(j,3)
  94. 7100 next:gosub500:return
  95. 8000 rem ** rundung von n **
  96. 8010 ny=n5-int(n5)
  97. 8020 ifny>.7thenn5=int(n5)+1:return
  98. 8030 ifny>.2thenn5=int(n5)+.5:return
  99. 8040 return
  100. 8100 rem ** formatierung von l **
  101. 8110 ifl<1e-6thenl=l*1e9:l$="n[200]":goto8150
  102. 8120 ifl<1e-3thenl=l*1e6:l$="u[200]":goto8150
  103. 8130 ifl<1thenl=l*1e3:l$="m[200]":goto8150
  104. 8140 l$="[200]"
  105. 8150 l=int(l+.5):return
  106. 8200 rem ** formatierung von r **
  107. 8210 ifr>1e6thenr=r/1e6:r$="[205][207]hm":goto8250
  108. 8220 ifr>1e3thenr=r/1e3:r$="k[207]hm":goto8250
  109. 8230 ifr>1thenr$="[207]hm":goto8250
  110. 8240 ifr>1e-3thenr=r*1e3:r$="[205]illi [207]hm"
  111. 8250 r=int(r*1000)/1000:return
  112. 9000 rem ** berechnung **
  113. 9010 d2=y1/(exp(log(n)/x1))
  114. 9020 ifd2>=1.068thend2=sqr((d2^2)/2):m2=1
  115. 9030 ifd2>=1.068thend2=1.068:j2=31
  116. 9040 forj2=1to31
  117. 9050 ifd2=<q1(j2,2)thend3=q1(j2,1):d4=q1(j2,2):z1=q1(j2,3):goto9070
  118. 9060 next
  119. 9070 n5=int((n5+.05)*10)/10:gosub8000
  120. 9080 n6=exp((log(y1/d4))*x1)
  121. 9090 fd=n5/n6:fe=int(fd*50+.5)/100:ifm2=1thenfe=fe*2
  122. 9100 z2=q(j1,6):r=(z2*n5*fd+100)/1000*z1:ifm2=1thenr=r/2
  123. 9110 r9=r:gosub8200
  124. 9120 return
  125. 50000 rem ** variablen lesen **
  126. 50010 dimq(15,7),q1(31,3),t$(15)
  127. 50100 t$(0)="[176][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  128. 50110 t$(1)="[221] [200][211][197]-[211]oft [221] [201]nduktivitaeten berechnen [221]"
  129. 50120 t$(2)="[171][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]
  130. 50130 t$(3)[178]"(NULL)                                      (NULL)"
  131. 50140 t$(4)[178]"/tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanexp
  132. 50150 t$(5)="[211]pule"
  133. 50160 t$(6)="[213]ebertrager"
  134. 50170 t$(7)="                                       "
  135. 50180 t$(8)="[194]itte waehlen:"
  136. 50190 t$(9)="[194]itte gewuenschte nummer eintippen"
  137. 50200 t$(10)="[203]erndaten nicht gef."
  138. 50210 t$(11)="[194]itte [206]eueingabe"
  139. 50220 t$(12)="[203]erndaten auflisten ?"
  140. 50230 t$(13)="[197]ingabe aendern ? (nein [210][197][212][213][210][206])"
  141. 51000 rem ** kerndaten **
  142. 51100 forj=1to15
  143. 51200 forw=1to7
  144. 51205 readw1
  145. 51210 q(j,w)=w1:next
  146. 51220 next
  147. 51400 data9,5,1,1.882,1.8565,18.5,10,11,7,1,1.836,2.3654,22,16,11,7,2,1.839
  148. 51420 data 2.5075,22,16,14,8,1,1.828,3.0292,28,25,14,8,2,1.832,3.2114,28,25
  149. 51430 data 18,11,1,1.839,3.8683,35.6,44
  150. 51440 data 18,11,2,1.861,4.1204,35.6,44,22,13,1,1.848,5.3375,44,63
  151. 51450 data 22,13,2,1.825,5.9283,44,63
  152. 51460 data 26,16,1,1.849,6.3362,52,94,26,16,2,1.834,6.9018,52,94
  153. 51470 data 30,19,1,1.835,7.8774,60,136
  154. 51480 data 30,19,2,1.831,8.5916,60,136,36,22,1,1.827,9.1729,73,201
  155. 51490 data 36,22,2,1.824,10.0917,73,201
  156. 52000 rem ** drahttabelle **
  157. 52100 forj=1to31
  158. 52200 forw=1to3
  159. 52205 readw1
  160. 52210 q1(j,w)=w1:next
  161. 52220 next
  162. 52400 data .032,.04,21.44,.04,.05,13.72,.05,.062,8.781,.063,.078,5.531
  163. 52420 data .071,.088,4.355,.08,.098,3.43,.09,.11,2.71,.1,.121,2.195
  164. 52440 data .112,.134,1.75,.125,.149,1.405,.14,.166,1.12,.16,.187,.8575
  165. 52460 data .18,.209,.6775,.2,.23,.5488,.224,.256,.4375,.25,.284,.3512
  166. 52480 data .28,.315,.28,.315,.352,.2212,.355,.395,.1742,.4,.442,.1372
  167. 52500 data .45,.495,.1084,.5,.548,.08781,.56,.611,.07,.63,.684,.05531
  168. 52520 data .71,.767,.04355,.75,.809,.03903,.8,.861,.0343,.85,.913,.03038
  169. 52540 data .9,.965,.0271,.95,1.017,.02432,1,1.068,.02195
  170. 53000 rem ** spalte und zeile **
  171. 53010 x=0:fori=52216to52243:reada:pokei,a:x=x+a:next
  172. 53020 ifx<>3662thenprint"data-fehler!":stop
  173. 53030 sz=52216:goto54000
  174. 53040 data32,253,174,32,158,183,138,72,32,253,174,32,158,183,104,168,24,32,240
  175. 53050 data255,32,253,174,76,164,170,96,
  176. 54000 rem ** bidschirmfarbe **
  177. 54010 i=15:j=0
  178. 54020 poke53280,i:poke53281,i:poke646,j
  179. 54030 print"[147]";t$(0);t$(1);t$(2);t$(3);t$(4)
  180. 54040 syssz,8,3," [194]ildschirmfarbe waehlen "
  181. 54050 syssz,6,8,"[194]itte [194]ildschirmfarbe mit"
  182. 54060 syssz,6,10,"den [195][213][210][211][207][210]-[212]asten waehlen":syssz,6,12,i;j
  183. 54070 gosub500
  184. 54080 ifa$=chr$(17)theni=i+1:ifi>15theni=0
  185. 54090 ifa$=chr$(17)then54020
  186. 54100 ifa$=chr$(145)theni=i-1:ifi<0theni=15
  187. 54110 ifa$=chr$(145)then54020
  188. 54120 ifa$=chr$(29)thenj=j+1:ifj>7thenj=0
  189. 54130 ifa$=chr$(29)then54020
  190. 54140 ifa$=chr$(157)thenj=j-1:ifj<0thenj=7
  191. 54150 ifa$=chr$(157)then54020
  192. 54160 ifa$=chr$(13)thenpoke52214,i:poke52214,i:poke52215,j:return
  193. 54170 goto54070
  194. 54180 return
  195. 55000 rem ** drucken **
  196. 55010 syssz,3,3,"[196]rucken"
  197. 55100 close1:open1,4,7:gosub55350
  198. 55110 print#1,chr$(14)spc(6)"[211]pule ([200]f-[196]rossel) * [197]ingabe"
  199. 55120 gosub55350
  200. 55130 print#1,chr$(15)spc(12)"[204] in [200]enry     =";l1
  201. 55140 print#1,chr$(15)spc(12)"[196] [203]ern-[196]urchm. =";d1
  202. 55150 print#1,chr$(15)spc(12)"[194] [203]ern-[194]reite  =";b1
  203. 55160 print#1,chr$(15)spc(12)"[203]z 1-2 [203]ammer  =";k1
  204. 55170 print#1,chr$(15)spc(12)"[193]l in n[200]enry   =";a1
  205. 55180 print#1,chr$(15)spc(12)"f in [200]erz      =";f1
  206. 55190 print#1:gosub55350
  207. 55200 print#1,chr$(14)spc(6)"[211]pule ([200]f-[196]rossel) * [193]usgabe"
  208. 55210 gosub55350
  209. 55240 print#1,chr$(15)spc(12)"[206]              =";na;
  210. 55250 ifma=0thenprint#1,chr$(15)chr$(16)chr$(51)chr$(50)"[215]indungen"
  211. 55260 ifma=1thenprint#1,chr$(15)chr$(16)chr$(51)chr$(50)"2 [215]ind. parallel"
  212. 55270 print#1,chr$(15)spc(12)"[196] [206]enn.        =";e1;chr$(16)chr$(51)chr$(50)"[195]ul"
  213. 55280 print#1,chr$(15)spc(12)"[196] [193]uss.        =";e2;chr$(16)chr$(51)chr$(50)"[195]ul"
  214. 55290 print#1,chr$(15)spc(12)"[210][195]u            =";ra;chr$(16)chr$(51)chr$(50)ra$
  215. 55300 print#1,chr$(15)spc(12)"[216]l [201]nduktanz   =";r2;chr$(16)chr$(51)chr$(50)r2$
  216. 55310 print#1,chr$(15)spc(12)"[209] [211]pulenguete  =";qq;chr$(16)chr$(51)chr$(50)r2$
  217. 55320 print#1,chr$(15)spc(12)"f[195]u            =";fa;
  218. 55330 print#1,chr$(16)chr$(51)chr$(50)"[203]upferfuellfaktor":print#1:gosub55350
  219. 55340 o2=0:print#1:print#1:close1:return
  220. 55350 print#1,chr$(15)spc(12);:fori=1to56:print#1,"-";:next:print#1:return
  221. 56000 rem ** drucken **
  222. 56100 close1:open1,4,7
  223. 56110 gosub56450:print#1,chr$(14)spc(4)"[203]erntabelle":gosub56450
  224. 56120 print#1,chr$(15)spc(8)"[196]-[203]ern";
  225. 56130 print#1,chr$(16)chr$(49)chr$(54)"[194]-[203]ern";chr$(16)chr$(50)chr$(52)"[203]z";
  226. 56140 print#1,chr$(16)chr$(51)chr$(50)"[216]1";chr$(16)chr$(52)chr$(48)"[217]1";
  227. 56150 print#1,chr$(16)chr$(53)chr$(52)"[204]n";chr$(16)chr$(54)chr$(50)"[193]e"
  228. 56160 print#1
  229. 56200 forj=1to15:print#1,chr$(15)spc(8);
  230. 56210 print#1,q(j,1);chr$(16)chr$(49)chr$(54)q(j,2);
  231. 56220 print#1,chr$(16)chr$(50)chr$(52)q(j,3);chr$(16)chr$(51)chr$(50)q(j,4);
  232. 56230 print#1,chr$(16)chr$(52)chr$(48)q(j,5);chr$(16)chr$(53)chr$(52)q(j,6);
  233. 56240 print#1,chr$(16)chr$(54)chr$(50)q(j,7)
  234. 56250 next
  235. 56300 gosub56450:print#1:print#1:print#1
  236. 56310 gosub56450:print#1,chr$(14)spc(4)"[196]rahttabelle":gosub56450
  237. 56320 print#1,chr$(15)spc(8)"[196]-[206]enn";
  238. 56330 print#1,chr$(16)chr$(50)chr$(48)"[196]-[193]ussen";
  239. 56340 print#1,chr$(16)chr$(51)chr$(50)"[210] [207]hm/m":print#1
  240. 56400 forj=1to31:print#1,chr$(15)spc(8);
  241. 56410 print#1,q1(j,1);chr$(16)chr$(50)chr$(48)q1(j,2);
  242. 56420 print#1,chr$(16)chr$(51)chr$(50)q1(j,3)
  243. 56430 next:gosub56450
  244. 56440 print#1:close1:return
  245. 56450 print#1,chr$(15)spc(8);:fori=1to60:print#1,"-";:next:print#1:return
  246.